import { request } from '@/utils/request';
/**
 * @description 获取流程分类列表
 * @returns
 */
export function getFlowSortList() {
  return request({
    url: '/api/deployment/getFlowSortTree',
    method: 'get',
  });
}

/**
 * @description 删除流程分类
 * @returns
 */
export function deleteFlowSort(data: API.DelFlowSortParams) {
  return request(
    {
      url: '/api/deployment/deleteFlowSort',
      method: 'post',
      data,
    },
    {
      successMsg: '删除成功',
    },
  );
}

/**
 * @description 创建流程分类
 * @returns
 */
export function createFlowSort(data: API.AddDictParams) {
  return request({
    url: '/api/deployment/addFlowSort',
    method: 'post',
    data,
  });
}

// 编辑流程分类
export function editFlowSort(data: API.UpdateFlowSortParams) {
  return request({
    url: '/api/deployment/saveFlowSort',
    method: 'post',
    data,
  });
}
